﻿/**
 * 生成 GUID（格式：xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx）
 */
export function getGUID(): string {
  const s4 = () => {
    return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);
  };
  return (
    s4() +
    s4() +
    "-" +
    s4() +
    "-" +
    s4() +
    "-" +
    s4() +
    "-" +
    s4() +
    s4() +
    s4()
  );
}
